drop table if exists jms_dws.dws_all_operation_cnt_hour_sum_dt;
create external table jms_dws.dws_all_operation_cnt_hour_sum_dt(
  network_code           string      comment '网点编码'
 ,network_name           string      comment '网点名称'
 ,input_times            bigint      comment '实际签收时间'
 ,send_times             bigint      comment '发件时间'
 ,arrival_times          bigint      comment '到件时间'
 ,deliver_times          bigint      comment '派件时间'
 ,sign_times             bigint      comment '签收时间'
 ,provider_desc          string      comment '省'
 ,city_desc              string      comment '市'
 ,area_desc              string      comment '区县'
 ,agent_code             string      comment '代理区code'
 ,agent_name             string      comment '代理区名称'
 ,franchisee_code        string      comment '加盟商编码'
 ,franchisee_name        string      comment '加盟商名称'
 ,hour                   string      comment '小时'
 )
 comment '运单全流程单量统计表(小时)'
 partitioned by (dt string comment '更新/创建日期 (yyyy-mm-dd)')
 stored as parquet
 location '/dw/hive/jms_dws.db/external/dws_all_operation_cnt_hour_sum_dt'
 tblproperties (
 'parquet.column.index.access'='true'
 );


 drop table if exists jms_dws.dws_all_operation_cnt_day_sum_dt;
create external table jms_dws.dws_all_operation_cnt_day_sum_dt(
  network_code           string      comment '网点编码'
 ,network_name           string      comment '网点名称'
 ,input_times            bigint      comment '实际签收时间'
 ,send_times             bigint      comment '发件时间'
 ,arrival_times          bigint      comment '到件时间'
 ,deliver_times          bigint      comment '派件时间'
 ,sign_times             bigint      comment '签收时间'
 ,provider_desc          string      comment '省'
 ,city_desc              string      comment '市'
 ,area_desc              string      comment '区县'
 ,agent_code             string      comment '代理区code'
 ,agent_name             string      comment '代理区名称'  
 ,franchisee_code        string      comment '加盟商编码'
 ,franchisee_name        string      comment '加盟商名称'            
 )
 comment '运单全流程单量统计表(天)'
 partitioned by (dt string comment '更新/创建日期 (yyyy-mm-dd)')
 stored as parquet
 location '/dw/hive/jms_dws.db/external/dws_all_operation_cnt_day_sum_dt'
 tblproperties (
 'parquet.column.index.access'='true'
 );